<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
//    return view('welcome');
//});
//
//Auth::routes();
//
//Route::get('/home', 'HomeController@index')->name('home');



use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;

Auth::routes();
Route::group(['prefix' => 'admin', ], function () {

    Route::get('/login', 'Admin\LoginController@showAdminLoginForm');
    Route::post('/login', 'Admin\LoginController@login');
    Route::post('/logout', 'Admin\LoginController@logout')->name('admin.logout');

    Route::group(['middleware' => 'auth:admin', ], function () {
        Route::get('/', function () {
            return view('admin.home');
        });
        Route::get('/desktop','Admin\DesktopController@index')->name('admin.desktop.index');//后台桌面
        //菜单管理
        Route::get('/admin/menu/index','Admin\MenuController@index')->name('admin.menu.index');
        Route::get('/menu/menu/add','Admin\MenuController@add')->name('admin.menu.add');
        Route::post('/menu/menu/addData','Admin\MenuController@addData')->name('admin.menu.addData');
        Route::get('/admin/menu/getList','Admin\MenuController@getList')->name('admin.menu.getList');
        Route::post('/admin/menu/delMenu','Admin\MenuController@delMenu')->name('admin.menu.delMenu');
        //权限管理
        Route::get('/admin/role/index','Admin\RoleController@index')->name('admin.role.index');
        Route::get('/admin/role/add','Admin\RoleController@add')->name('admin.role.add');
        Route::post('/admin/role/saveData','Admin\RoleController@saveData')->name('admin.role.saveData');
        //前台用户
        Route::get('/admin/user/index','Admin\UserController@index')->name('admin.user.index');
        Route::get('admin/user/getlist','Admin\UserController@getList')->name('admin.user.getlist');
        //后台管理
        Route::get('/admin/admin/index','Admin\AdminController@index')->name('admin.admin.getlist');
        Route::get('/admin/admin/getList','Admin\AdminController@getList')->name('admin.admin.getlistdata');
        Route::get('/admin/admin/add','Admin\AdminController@add')->name('admin.admin.add');
        //新闻管理
        Route::get('/admin/newcat/index','Admin\NewCatController@index')->name('admin.newcat.index');
        Route::get('/admin/newcat/getlist','Admin\NewCatController@getlist')->name('admin.newcat.getlist');
        //国内新闻管理
        Route::get('/admin/countryin/index','Admin\CountryInController@index')->name('admin.countryin.index');
        Route::get('/admin/countryin/getList','Admin\CountryInController@getList')->name('admin.countryin.getlist');
        Route::get('/admin/countryin/add','Admin\CountryInController@add')->name('admin.countryin.add');
        Route::post('/admin/countryin/addSave','Admin\CountryInController@addSave')->name('admin.countryin.addSave');
        Route::post('/admin/countryin/delCountryIn','Admin\CountryInController@delCountryIn')->name('admin.countryin.delCountryIn');
        Route::get('/admin/countryin/edit/{id?}','Admin\CountryInController@editCountryIn')->name('admin.countryin.edit');
        Route::post('/admin/countryin/editsave','Admin\CountryInController@editSave')->name('admin.countryin.editsave');
        Route::post('/admin/countryin/ischeck','Admin\CountryInController@isCheck')->name('admin.countryin.ischeck');
        Route::post('/admin/countryin/isstatus','Admin\CountryInController@isStatus')->name('admin.countryin.isstatus');
       //国际新闻
        Route::get('/admin/countryOut/index','Admin\CountryOutController@index')->name('admin.countryout.index');
        Route::get('/admin/countryOut/getList','Admin\CountryOutController@getList')->name('admin.countryout.getlist');
        Route::get('/admin/countryOut/add','Admin\CountryOutController@add')->name('admin.countryout.add');
        Route::post('/admin/countryOut/addSave','Admin\CountryOutController@addSave')->name('admin.countryout.addSave');
        Route::post('/admin/countryOut/delCountryOut','Admin\CountryOutController@delCountryOut')->name('admin.countryout.delCountryOut');
        Route::get('/admin/countryOut/edit/{id?}','Admin\CountryOutController@editCountryOut')->name('admin.countryout.edit');
        Route::post('/admin/countryOut/editsave','Admin\CountryOutController@editSave')->name('admin.countryout.editsave');
        Route::post('/admin/countryOut/ischeck','Admin\CountryOutController@isCheck')->name('admin.countryout.ischeck');
        Route::post('/admin/countryOut/isstatus','Admin\CountryOutController@isStatus')->name('admin.countryout.isstatus');
        //娱乐新闻
        Route::get('/admin/recreation/index','Admin\RecreationController@index')->name('admin.recreation.index');
        Route::get('/admin/recreation/getList','Admin\RecreationController@getList')->name('admin.recreation.getlist');
        Route::get('/admin/recreation/add','Admin\RecreationController@add')->name('admin.recreation.add');
        Route::post('/admin/recreation/addSave','Admin\RecreationController@addSave')->name('admin.recreation.addSave');
        Route::post('/admin/recreation/delsports','Admin\RecreationController@delCountryRecreation')->name('admin.recreation.delsports');
        Route::get('/admin/recreation/edit/{id?}','Admin\RecreationController@editCountryRecreation')->name('admin.recreation.edit');
        Route::post('/admin/recreation/editsave','Admin\RecreationController@editSave')->name('admin.recreation.editsave');
        Route::post('/admin/recreation/ischeck','Admin\RecreationController@isCheck')->name('admin.recreation.ischeck');
        Route::post('/admin/recreation/isstatus','Admin\RecreationController@isStatus')->name('admin.recreation.isstatus');
        //体育新闻
        Route::get('/admin/sports/index','Admin\SportsController@index')->name('admin.sports.index');
        Route::get('/admin/sports/getList','Admin\SportsController@getList')->name('admin.sports.getlist');
        Route::get('/admin/sports/add','Admin\SportsController@add')->name('admin.sports.add');
        Route::post('/admin/sports/addSave','Admin\SportsController@addSave')->name('admin.sports.addSave');
        Route::post('/admin/sports/delCountrySports','Admin\SportsController@delCountrySports')->name('admin.sports.delCountrysports');
        Route::get('/admin/sports/edit/{id?}','Admin\SportsController@editCountrySports')->name('admin.sports.edit');
        Route::post('/admin/sports/editsave','Admin\SportsController@editSave')->name('admin.sports.editsave');
        Route::post('/admin/sports/ischeck','Admin\SportsController@isCheck')->name('admin.sports.ischeck');
        Route::post('/admin/sports/isstatus','Admin\SportsController@isStatus')->name('admin.sports.isstatus');
        //下载分类
        Route::get('/admin/downloadcat/index','Admin\DownloadCatController@index')->name('admin.downloadcat.index');
        Route::get('/admin/downloadcat/getlist','Admin\DownloadCatController@getList')->name('admin.downloadcat.getlist');
        Route::get('/admin/downloadcat/add','Admin\DownloadCatController@add')->name('admin.downloadcat.add');
        Route::post('/admin/downloadcat/addsave','Admin\DownloadCatController@addSave')->name('admin.downloadcat.addsave');
        //素材下载
        Route::get('/admin/material/index','Admin\MaterialController@index')->name('admin.material.index');
        Route::get('/admin/material/getlist','Admin\MaterialController@getList')->name('admin.material.getlist');
        Route::get('/admin/material/transfer','Admin\MaterialController@transfer')->name('admin.material.transfer');
        Route::get('/admin/material/add','Admin\MaterialController@add')->name('admin.material.add');
        Route::post('/admin/material/addsave','Admin\MaterialController@addSave')->name('admin.material.addsave');
        Route::get('/admin/material/edit/{id?}','Admin\MaterialController@edit')->name('admin.material.edit');
        Route::post('/admin/material/editsave','Admin\MaterialController@editSave')->name('admin.material.editsave');
        Route::post('/admin/material/del','Admin\MaterialController@del')->name('admin.material.del');
        Route::get('/admin/material/uploadimages','Admin\ImagesController@uploadImages')->name('admin.images.uploadimages');
        //
        Route::post('/admin/images/uploadimages','Admin\ImagesController@uploadImages')->name('admin.images.uploadimages');

    });
});
